//导入一个函数 
import {createStore, applyMiddleware, combineReducers} from 'redux';
import thunk from 'redux-thunk';
import countReducer from './reducers/countReducer';
import zanReducer from './reducers/zanReducer';
import todoReducer from './reducers/todoReducer';
import {composeWithDevTools} from 'redux-devtools-extension';

//合并 reducer 函数
let reducer = combineReducers({
  count: countReducer,
  zan: zanReducer,
  todo: todoReducer
});

//创建 store 对象  store 存储, 仓库
const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));

//暴露 store 对象
export default store;

